<?php
class Order_Service_OrderProduct
{

    public static function add($row){
        $Obj = new Order_Model_OrderProduct();
        return $Obj->add($row);
	}

	public static function update($row,$value,$field='op_id'){
        $Obj = new Order_Model_OrderProduct();
        return $Obj->update($row,$value,$field);
	}


	public static function delete($value,$field='op_id'){
        $Obj = new Order_Model_OrderProduct();
        return $Obj->delete($value,$field);

	}


	public static function getByValue($value,$field='op_id'){
        $Obj = new Order_Model_OrderProduct();
        return $Obj->getByValue($value,$field);
	}

    public static function getByCondition($condition,$type='*',$orderby="",$page=0,$pageSize=0){
        $Obj = new Order_Model_OrderProduct();
        return $Obj->getByCondition($condition,$type,$orderby,$page,$pageSize);
	}
	
	/**
	 * 通过产品ID 获取 订单号
	 *
	 */
	public static function getAllOrderCodeByValue($value,$field='product_id',$page=0,$pageSize=0){
        $Obj = new Order_Model_OrderProduct();
        return $Obj->getAllOrderCodeByValue($value,$field,$page,$pageSize);
	}
	
	
}